package com.github.catvod.spider.merge;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.annotation.Nullable;

/* loaded from: classes.dex */
public class Dv extends ArrayList<Lm> {
    public Dv() {
    }

    public String I() {
        StringBuilder V0 = ZG.V0();
        Iterator<Lm> it = iterator();
        while (it.hasNext()) {
            Lm next = it.next();
            if (V0.length() != 0) {
                V0.append(" ");
            }
            V0.append(next.e());
        }
        return ZG.t(V0);
    }

    @Override // java.util.ArrayList
    /* renamed from: V0, reason: merged with bridge method [inline-methods] */
    public Dv clone() {
        Dv dv = new Dv(size());
        Iterator<Lm> it = iterator();
        while (it.hasNext()) {
            dv.add(it.next().oq());
        }
        return dv;
    }

    public String h(String str) {
        Iterator<Lm> it = iterator();
        while (it.hasNext()) {
            Lm next = it.next();
            if (next.i4(str)) {
                return next.j(str);
            }
        }
        return "";
    }

    @Nullable
    public Lm j() {
        if (isEmpty()) {
            return null;
        }
        return get(size() - 1);
    }

    public String q() {
        StringBuilder V0 = ZG.V0();
        Iterator<Lm> it = iterator();
        while (it.hasNext()) {
            Lm next = it.next();
            if (V0.length() != 0) {
                V0.append("\n");
            }
            V0.append(next.w4());
        }
        return ZG.t(V0);
    }

    @Override // java.util.AbstractCollection
    public String toString() {
        return q();
    }

    public Dv(int i) {
        super(i);
    }

    public Dv(List<Lm> list) {
        super(list);
    }
}
